package cn.wolfcode.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
@Document("problem_comment")
public class ProblemComment implements Serializable {
    public static final int TRAVLE_COMMENT_TYPE_COMMENT = 0; //普通回答
    public static final int TRAVLE_COMMENT_TYPE = 1; //回答的评论

    @Id
    private String id;  //id
    private Long probId;  //问题id
    private String probTitle; //问题标题

    private Long userId;    //用户id
    private String username; //用户名
    private String city;
    private int level;   //等级
    private String headUrl;   // 用户头像

    private int type = TRAVLE_COMMENT_TYPE_COMMENT; //评论类别

    private Date createTime; //创建时间
    private String content;  //回答内容

    private int jinnum;  //金牌数
    private int answernum;//回答问题次数
    private int thumbupnum;     //点赞数
    private List<Long> thumbuplist = new ArrayList<>();  //点赞用户id集合

    private ProblemComment refComment;  //关联的评论
}
